import { defineConfig } from '@vben/vite-config';

// import { autoBuildDict } from 'common-utils';

export default defineConfig(async () => {
  return {
    application: {},
    vite: {
      hmr: true,
      plugins: [],
      server: {
        host: '0.0.0.0',
        open: false,
        port: 9601,
        proxy: {
          '/api': {
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/api/, ''),
            // mock代理目标地址
            // target: 'http://127.0.0.1:8090/service/api',
            // target: 'http://192.168.147.238:9000',
            target: 'http://192.168.144.131:8080',
            ws: true,
          },
        },
      },
    },
  };
});
